<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>就业信息系统管理</title>
    <link rel="stylesheet" type="text/css" href="/static/admin/css/reset.css">
    <link rel="stylesheet" type="text/css" href="/static/admin/css/main.css">
    <script type="text/javascript" src="/static/admin/js/jquery-1.12.4.min.js"></script>
    <script type="text/javascript" src="/static/admin/js/jquery.form.min.js"></script>
    <script src="/static/admin/tinymce/js/tinymce/tinymce.min.js"></script>
    <script src="/static/admin/js/tinymce_setup.js"></script>
    <script src="/static/admin/js/news_edit_detail.js"></script>
</head>
<body>
<div class="breadcrub">
    当前位置：就业信息管理>添加就业信息
</div>
<div class="pannel">
    <form class="news_edit">
        <h3 class="review_title">就业信息编辑</h3>
        <div class="form_group">
            <label>职位名称：</label>
            <input type="text" class="input_txt1" value="{{ job.job_title }}">
        </div>
        <div class="form_group">
            <label>工作性质：</label>
            <input type="text" class="input_txt2" value="{{ job.job_category }}">
        </div>
        <div class="form_group">
            <label>工作经验要求：</label>
            <input type="text" class="input_txt3" value="{{ job.job_experience }}">
        </div>
        <div class="form_group">
            <label>月薪范围：</label>
            <input type="text" class="input_txt4" value="{{ job.job_monthly_pay }}">
        </div>
        <div class="form_group">
            <label>学历要求：</label>
            <input type="text" class="input_txt5" value="{{ job.job_education }}">
        </div>
        <div class="form_group">
            <label>工作地点：</label>
            <input type="text" class="input_txt6" value="{{ job.job_address }}">
        </div>
        <div class="form_group">
            <label>招聘人数：</label>
            <input type="text" class="input_txt7" value="{{ job.job_count }}">
        </div>
        {#        <div class="form_group">#}
        {#            <label>发布日期：</label>#}
        {#            <input type="text" class="input_txt8" value="{{ job.create_time }}">#}
        {#        </div>#}
        {#	    	<div class="form_group">#}
        {#				<label>新闻分类：</label>#}
        {#				<select class="sel_opt">#}
        {#					<option value="">分类一</option>#}
        {#					<option value="">分类二</option>#}
        {#					<option value="">分类三</option>#}
        {#				</select>#}
        {#			</div>#}
        {#			<div class="form_group">#}
        {#				<label>新闻摘要：</label>#}
        {#				<textarea class="input_multxt">据日经新闻网，软银计划让旗下核心业务移动手机部门SoftBank Corp.分拆上市，或募资2万亿日元(约180亿美元。随着软银逐步向投资公司转型，此举旨在给手机业务部门更多自主权。</textarea>#}
        {#			</div>#}
        {#			<div class="form_group">#}
        {#				<label>索引图片：</label>#}
        {#                <img src="" alt="索引图片" class="index_pic">#}
        {#			</div>#}
        {#			<div class="form_group">#}
        {#				<label>上传图片：</label>#}
        {#				<input type="file" class="input_file">#}
        {#			</div>#}
        <div class="form_group">
            <label>专业要求：</label>
            <input type="text" class="input_txt9" value="{{ job.job_major }}">
        </div>
        <div class="form_group indent_group line_top">
            <input id="submit" type="submit" value="确定" class="confirm">
            <input type="button" value="取消" class="cancel" onclick="cancel()">
        </div>
    </form>
</div>


<!-- jQuery -->
<script src="/static/register/js/jquery.min.js"></script>
{#<script src="/static/register/js/jquery-1.12.4.min.js"></script>#}
<script src="/static/register/js/jquery.form.min.js"></script>
<script src="/static/register/js/jquery.pagination.min.js"></script>
<!-- Bootstrap -->
<script src="/static/register/js/bootstrap.min.js"></script>
<!-- Placeholder -->
<script src="/static/register/js/jquery.placeholder.min.js"></script>
<!-- Waypoints -->
<script src="/static/register/js/jquery.waypoints.min.js"></script>
<!-- Main JS -->
<script src="/static/register/js/main.js"></script>

{# 修改 #}
<script>
    $(function () {
        //点击发送ajax请求
        $('#submit').click(function () {
            job_title = $('.input_txt1').val();
            job_category = $('.input_txt2').val();
            job_experience = $('.input_txt3').val();
            job_monthly_pay = $('.input_txt4').val();
            job_education = $('.input_txt5').val();
            job_address = $('.input_txt6').val();
            job_count = $('.input_txt7').val();
            {#create_time = $('.input_txt8').val();#}
            job_major = $('.input_txt9').val();


            var params = {
                "job_title": job_title,
                "job_category": job_category,
                "job_experience": job_experience,
                "job_monthly_pay": job_monthly_pay,
                "job_education": job_education,
                "job_address": job_address,
                "job_count": job_count,
                {#"create_time": create_time,#}
                "job_major": job_major,
            };

            $.ajax({
                url: "/changejob_info/" + {{ job.id }} +"/",
                type: "post",
                contentType: "application/json",
                // 响应数据的格式
                dataType: "json",
                data: JSON.stringify(params),
                success: function (resp) {
                    if (resp.code == "0") {
                        // 刷新当前界面
                        history.go(-1).reload();
                        {#location.reload();#}
                        {#window.top.location = "/index";#}
                    } else {
                        alert(resp.errmsg);
                        {#$("#register-err").html(resp.errmsg);#}
                        {#$("#register-err").show();#}
                        {#$(".get_pic_code").attr("src", "/member/image_code?id=" + Math.random())#}
                    }
                }
            })
        });
    })
</script>


</body>
</html>
